package org.example.spring_frist.MessageProject.dao;

import org.example.spring_frist.MessageProject.mapper.messageMapper;
import org.example.spring_frist.MessageProject.model.messageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class MessageDao {

    @Autowired
    private messageMapper mapper;

    public List<messageInfo> selectAllMessages() {
        return mapper.selectAllMessages();
    }

    public int insertMessage(messageInfo messageInfo) {
        return mapper.insertMessage(messageInfo);
    }
}
